package cn.zhizihua.service.impl;

import cn.zhizihua.domain.po.Food;
import cn.zhizihua.mapper.FoodMapper;
import cn.zhizihua.service.IFoodService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FoodServiceImpl extends ServiceImpl<FoodMapper, Food> implements IFoodService {

    @Autowired
    FoodMapper foodMapper;

    @Override
    public List<Food> getByBusinessId(Integer bid) {
        List<Food> foodList = foodMapper.selectList(new QueryWrapper<Food>().eq("businessId", bid));
        return foodList;
    }
}
